home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / shmctl.man < prev    next >
Encoding:
Text File  |  1991-05-14  |  4.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. shmctl                C Library Procedures                 shmctl
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      shmctl - shared memory control operations
  10.  
  11. SSYYNNTTAAXX
  12.      ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
  13.      ##iinncclluuddee <<ssyyss//iippcc..hh>>
  14.      ##iinncclluuddee <<ssyyss//sshhmm..hh>>
  15.  
  16.      iinntt sshhmmccttll ((sshhmmiidd,, ccmmdd,, bbuuff))
  17.      iinntt sshhmmiidd,, ccmmdd;;
  18.      ssttrruucctt sshhmmiidd__ddss **bbuuff;;
  19.  
  20. DDEESSCCRRIIPPTTIIOONN
  21.      The system call provides a variety of shared memory control
  22.      operations as specified by _c_m_d. The following _c_m_d_s are
  23.      available:
  24.  
  25.      IIPPCC__SSTTAATT       Place the current value of each member of the
  26.                     data structure associated with _s_h_m_i_d into the
  27.                     structure pointed to by _b_u_f.  The contents of
  28.                     this structure are defined in
  29.  
  30.      IIPPCC__SSEETT        Set the value of the following members of the
  31.                     data structure associated with _s_h_m_i_d to the
  32.                     corresponding value found in the structure
  33.                     pointed to by _b_u_f: shm_perm.uid shm_perm.gid
  34.                     shm_perm.mode    /* only low 9 bits */
  35.  
  36.              This _c_m_d can only be executed by a process that has
  37.              an effective user ID equal to either that of super
  38.              user or to the value of sshhmm__ppeerrmm..uuiidd in the data
  39.              structure associated with _s_h_m_i_d.
  40.  
  41.      IIPPCC__RRMMIIDD       Remove the shared memory identifier specified
  42.                     by _s_h_m_i_d from the system and destroy the
  43.                     shared memory segment and data structure
  44.                     associated with it. This _c_m_d can only be exe-
  45.                     cuted by a process that has an effective user
  46.                     ID equal to either that of super user or to
  47.                     the value of sshhmm__ppeerrmm..uuiidd in the data struc-
  48.                     ture associated with _s_h_m_i_d.
  49.  
  50.      SSHHMM__LLOOCCKK       Lock the shared memory segment specified by
  51.                     _s_h_m_i_d in memory.  This _c_m_d can only be exe-
  52.                     cuted by a process that has an effective usr
  53.                     ID equal to super user.
  54.  
  55.      SSHHMM__UUNNLLOOCCKK     Unlock the shared memory segment specified by
  56.                     _s_h_m_i_d. This _c_m_d can only be executed by a
  57.                     process that has an effective usr ID equal to
  58.                     super user.
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0                                                     1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. shmctl                C Library Procedures                 shmctl
  71.  
  72.  
  73.  
  74. RREETTUURRNN VVAALLUUEE
  75.      Upon successful completion, a value of 0 is returned.  Oth-
  76.      erwise, a value of -1 is returned and _e_r_r_n_o is set to indi-
  77.      cated the error.
  78.  
  79. DDIIAAGGNNOOSSTTIICCSS
  80.      The system call will fail if one or more of the following
  81.      are true:
  82.  
  83.      [EINVAL]       The _s_h_m_i_d is not a valid shared memory iden-
  84.                     tifier.
  85.  
  86.      [EINVAL]       The _c_m_d is not a valid command.
  87.  
  88.      [EACCES]       The _c_m_d is equal to IPC_STAT and read permis-
  89.                     sion is denied to the calling process.  For
  90.                     further information, see
  91.  
  92.      [EPERM]        The _c_m_d is equal to IPC_RMID or IPC_SET and
  93.                     the effective user ID of the calling process
  94.                     is not equal to that of super user and it is
  95.                     not equal to the value of sshhmm__ppeerrmm..uuiidd in the
  96.                     data structure associated with _s_h_m_i_d.
  97.  
  98.      [EPERM]        The _c_m_d is equal to SHM_LOCK or SHM_UNLOCK
  99.                     and the effective user ID of the calling pro-
  100.                     cess is not equal to that of superuser.
  101.  
  102.      [EINVAL]       The _c_m_d is equal to SHM_LOCK and the shared
  103.                     memory segment is currently locked by this
  104.                     process.
  105.  
  106.      [EINVAL]       The _c_m_d is equal to SHM_UNLOCK and the shared
  107.                     memory segment specified by _s_h_m_i_d is not
  108.                     currently locked in memory by this process.
  109.  
  110.      [EFAULT]       The _b_u_f points to an illegal address.
  111.  
  112. SSEEEE AALLSSOO
  113.      shmget(2), shmop(2)
  114.  
  115. BBUUGGSS
  116.      The System V shared memory functions are implemented at user
  117.      level on top of the mmap(2) interface.  Not all the System V
  118.      functionality is implemented.
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0                                                     2
  130.  
  131.  
  132.  
  133.